import java.util.Arrays;
import java.util.Scanner;

public class LearnTest {
    public static void main(String[] args) {
        int[] array = new int[]{1,2,34,3,4,5,7,23,12};
        boolean flag = oddNum(array);
        System.out.println(flag);
    }
    public static boolean oddNum(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] % 2 == 0) {
                continue;
            }else {
                if(arr[i+1] % 2 != 0 && arr[i+2] % 2 != 0) {
                    return true;
                }else {
                    continue;
                }
            }
        }
        return false;
    }
    public static void main17(String[] args) {
        int[] array = new int[]{3,3,3,2,2,2,1,2,2};
        for (int i = 0; i < array.length; i++) {
            int count = 0;
            for (int j = 0; j < array.length; j++) {
                if(array[i] == array[j]) {
                    count++;
                }
            }
            if(count > array.length/2) {
                System.out.println(array[i]);
                break;
            }
        }
    }
    public static void main16(String[] args) {
        int[] array = new int[]{2,2,4,4,3,6,6};
        for (int i = 0; i < array.length; i++) {
            int count = 0;
            for (int j = 0; j < array.length; j++) {
                if(array[i] == array[j]) {
                    //n = array[i];
                    count++;
                }
            }
            if(count == 1) {
                System.out.println(array[i]);
            }
        }
    }
    public static void main15(String[] args) {
        int[] nums = new int[]{1,2,3,4,5};
        Scanner in = new Scanner(System.in);
        System.out.println("输入两数之和");
        int target = in.nextInt();
        int[] sumNums = enumSum(nums,target);
        System.out.println(Arrays.toString(sumNums));
    }
    public static int[] enumSum(int[] nums,int x) {
        int[] sumNums = new int[2];
        for (int i = 0; i < nums.length; i++) {
            for (int j = i+1; j < nums.length; j++) {
                if(nums[i] + nums[j] == x) {
                    sumNums[0] = i;
                    sumNums[1] = j;
                    return sumNums;
                }
            }
        }
        return null;
    }
    public static void main14(String[] args) {
        int[] array = new int[]{7,1,2,4,5,8,6,3,10,9};
        moPoSort(array);
        System.out.println(Arrays.toString(array));
    }
    public static void moPoSort(int[] arr) {
        int temp = 0;
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = i; j < arr.length - i - 1; j++) {
                if(arr[j] > arr[j+1]) {
                    temp = arr[j+1];
                    arr[j+1] = arr[j];
                    arr[j] = temp;
                }
            }
        }
    }
    public static void main13(String[] args) {
        int[] arr = new int[]{1,2,3,4,5,6,7,8,9,10};
        Scanner in = new Scanner(System.in);
        System.out.println("输入要查找的数");
        int x = in.nextInt();
        int n = towFind(arr,x);
        System.out.println("该数字的下标是"+n);
    }
    public static int towFind(int[] arr,int x) {
        int max = arr.length - 1;
        int mid = max/2;
        int min = 0;
        while(x != arr[mid]) {
            if(x < arr[mid]) {
                max = mid;
                mid = mid/2;
            }else {
                min = mid;
                mid = (max + mid)/2;
            }
        }
        return mid;
    }
    public static void main12(String[] args) {
        int[] arr = new int[]{1,2,3,4,5,6};
        int[] tempArr = new int[arr.length];
        int j = 0;
        int i = 0;
        for (i = 0,j = 0; i < arr.length; i++) {
            if(arr[i] % 2 != 0) {
                tempArr[j] = arr[i];
                j++;
            }
        }
        for (i = 0; i < arr.length; i++) {
            if(arr[i] % 2 == 0) {
                tempArr[j] = arr[i];
                j++;
            }
        }
        System.out.println(Arrays.toString(tempArr));
    }
    public static void main11(String[] args) {
        int[] array = new int[]{1,2,3};
        System.out.println(Arrays.toString(array));
        transform(array);
        System.out.println(Arrays.toString(array));
    }
    public static void transform(int[] array) {
        for (int i = 0; i < array.length; i++) {
            array[i] = array[i]*2;
        }
    }
    public static void main10(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextDouble()) {

        }
    }
    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        hano(n,'A','B','C');
    }
    public static void hano(int n,char a,char b,char c) {
        if (n == 1) {
            move(n,a,c);
        }else {
            hano(n-1,a,c,b);
            move(n,a,c);
            hano(n-1,b,a,c);
        }
    }

    public static void move(int n,char a,char b) {
        System.out.println("第"+n+"个盘子从"+a+"移动到"+b);
    }
    public static void main8(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        printArray(arr);
    }
    public static void printArray(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
    public static void main7(String[] args) {
        int[] arr = new int[100];
        for (int i = 1; i <= 100; i++) {
            arr[i-1] = i;
        }
        for (int i = 0; i < 100; i++) {
            System.out.println(arr[i]);
        }
    }
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入数");
        int n = scan.nextInt();
        int a = fib(n);
        System.out.println(a);
    }
    public static int fib(int n) {
        if(n == 1||n == 2) {
            return 1;
        }else {
            return fib(n-1)+fib(n-2);
        }
    }
    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入数");
        int n = scan.nextInt();
        int enumSum = sum(n);
        System.out.println(enumSum);
    }
    public static int sum(int n) {
        if(n <= 9) {
            return n;
        }else {
            return n%10 + sum(n/10);
        }
    }
    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入数");
        int n = scan.nextInt();
        div(n);
    }

    public static void div(int n) {
        if(n <= 9) {
            System.out.println(n % 10);
        }else {
            div(n/10);
            System.out.println(n % 10);
        }
    }
    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入数");
        int n = scan.nextInt();
        int a = factorial(n);
        System.out.println(n+"的累加是"+a);
    }
    public static int factorial(int n) {
        if(n == 1) {
            return 1;
        }else {
            return n+factorial(n-1);
        }
    }
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入数");
        int n = scan.nextInt();
        int a = factorial(n);
        System.out.println(n+"的阶乘是"+a);
    }

    public static void main1(String[] args) {
        int[] arr1= new int[3];
        int[] arr2 = {1,2,3,4};
        arr1 = arr2;
        arr1[0] = 100;
        arr1[1] = 200;
        arr2[3] = 400;
        int n = arr1.length;
        System.out.println(n);
        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr1[i]);
        }
    }
}
